package algorithm.markovLink;

import static org.junit.Assert.fail;

import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.junit.Test;

public class ReadCorpusTest {

	@Test
	public void test2() {
		int idx = 'z' - 'a';
		System.out.println(idx);
	}

	@Test
	public void test1() throws IOException, ClassNotFoundException {
		String path1 = ReadCorpusTest.class.getResource("corpus1").getPath();
		String path2 = ReadCorpusTest.class.getResource("corpus2").getPath();
		String path3 = ReadCorpusTest.class.getResource("corpus3").getPath();
		// System.out.println(url.getPath());
		int[][] matrix = new ReadCorpus().read_corpus(path1, path2, path3);
		Utils.dispMatrix(matrix);
	}

	@Test
	public void test0() {
		String pStr = "[a-zA-Z]{3,}";
		String line = "as df ew sdf ee  asdf 1234 ad a-3s";
		Matcher m = Pattern.compile(pStr).matcher(line);
		while (m.find()) {
			System.out.println(m.group());
		}
	}

	@Test
	public void test() {
		fail("Not yet implemented");
	}

}
